let chartConfig={
  getConfig(num, isBig=true){
    let thickness = isBig?10: 5;
    let tickLength = isBig?10: 5;
    let ppmY = isBig?10: 5;
    let distance = isBig?-25:-15;
    let seriesY = isBig?15:5;
    return {
      chart: {
        type: 'gauge',
        backgroundColor: 'transparent',
        plotBackgroundColor: null,
        plotBackgroundImage: null,
        plotBorderWidth: 0,
        plotShadow: false,
        spacing:[0,0,0,0]
      },
      credits: {
        enabled:false
      },
      title: {
        text: null,
      },
      pane: {
        startAngle: -150,
        endAngle: 150,
        background: [{
          backgroundColor: '#2c5376',
        },]
      },
      // the value axis
      yAxis: {
        min: 0,
        max: 200,
        minorTickInterval: 'auto',
        minorTickWidth: 1,
        minorTickLength: tickLength,
        minorTickPosition: 'inside',
        minorTickColor: '#456785',
        tickPixelInterval: 30,
        tickWidth: 2,
        tickPosition: 'inside',
        tickLength: tickLength,
        tickColor: '#456785',
        labels: {
          distance: distance,
          step: 2,
          rotation: 'auto',
          style: {
            color: '#FFFFFF',
            fontSize: isBig?6:3,
          }
        },
        title: {
          text: 'PPM',
          style: {
            color: '#FFFFFF',
            fontSize: 8,
          },
          y: ppmY,
        },
        plotBands: [{
          thickness: thickness,
          from: 0,
          to: 120,
          color: '#17B9B1', // green
        }, {
          thickness: thickness,
          from: 120,
          to: 160,
          color: '#BED474' // yellow
        }, {
          thickness: thickness,
          from: 160,
          to:200,
          color: '#BC2C5E' // red
        }]
      },
      series: [{
        name: 'Methane',
        data: [num],
        dataLabels:{
          color:'#fff',
          borderWidth: 0,
          y: seriesY,
          style:{
            textOutline:"none",
            fontSize: 9,
          }
        },
        tooltip: {
          valueSuffix: ' PPM'
        }
      }]
    }
  }
}

export  default chartConfig;
